﻿using pbvs.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace pbvs.Data.Repositories.RepositoryExtensions
{
    public static class FormElementExtensions
    {
        public static IQueryable<FormElement> ByField(this IQueryable<FormElement> query, string field)
        {
            if (!string.IsNullOrEmpty(field))
            {
                query = from q in query where q.Field == field select q;
            }
            return query;
        }
    }
}